package com.sokal.easycare.modules.sysparams.entity;

import org.hibernate.validator.constraints.Length;

import com.sokal.easycare.common.persistence.DataEntity;

/**
 * 参数配置，用于配置系统中统一格式参数内容Entity
 * @author lihaipei
 * @version 2017-04-18
 */
public class SysParams extends DataEntity<SysParams> {
	
	private static final long serialVersionUID = 1L;
	private String paramType;		// 平台收益类型
	private String paramCode;		// 试算类型
	private String paramValue;		// 参数值（如填写分成比例等）
	private String paramName;		// 参数名称
	
	public SysParams() {
		super();
	}

	public SysParams(String id){
		super(id);
	}

	public SysParams(String paramCode, boolean isCode){
		super();
		this.paramCode = paramCode;
	}

	public SysParams(String paramName, String isName){
		super();
		this.paramName = paramName;
	}

	@Length(min=0, max=100, message="参数类型长度必须介于 0 和 100 之间")
	public String getParamType() {
		return paramType;
	}

	public void setParamType(String paramType) {
		this.paramType = paramType;
	}
	
	@Length(min=0, max=64, message="参数id（数据字典id）长度必须介于 0 和 64 之间")
	public String getParamCode() {
		return paramCode;
	}

	public void setParamCode(String paramCode) {
		this.paramCode = paramCode;
	}
	
	@Length(min=0, max=255, message="参数值（如填写分成比例等）长度必须介于 0 和 255 之间")
	public String getParamValue() {
		return paramValue;
	}

	public void setParamValue(String paramValue) {
		this.paramValue = paramValue;
	}
	
	@Length(min=0, max=100, message="参数值所属名称（如分成中分成角色等）长度必须介于 0 和 100 之间")
	public String getParamName() {
		return paramName;
	}

	public void setParamName(String paramName) {
		this.paramName = paramName;
	}
	
	/** 普通参数配置*/
	public static final String PARAM_CODE0_ = "0";
	/** 平台收益参数配置*/
	public static final String PARAM_CODE1_ = "1";
	/** 试算参数配置*/
	public static final String PARAM_CODE2_ = "2";
	
}